<template>
  <!-- <div class="goods"> -->
  <!-- vi-if 等待加载完成 -->
  <div class="goods" v-if="goods.length">
    <goods-item v-for="(item, index) in goods" :key="index" :item="item"></goods-item>
  </div>
</template>

<script>
import GoodsItem from "./GoodsItem";
export default {
  props: {
    goods: ""
  },
  name: "GoodsList",
  components: {
    "goods-item": GoodsItem
  }
};
</script>

<style scoped>
.goods {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
}
</style>
